<!--
  This file is a part of the open-eBackup project.
  This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
  If a copy of the MPL was not distributed with this file, You can obtain one at
  http://mozilla.org/MPL/2.0/.
  
  Copyright (c) [2024] Huawei Technologies Co.,Ltd.
  
  THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
  EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
  MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
  -->

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="en-us" xml:lang="en-us">
 <head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="DC.Type" content="topic">
  <meta name="DC.Title" content="Step 6: Performing Backup">
  <meta name="product" content="">
  <meta name="DC.Relation" scheme="URI" content="kubernetes_gud_00011.html">
  <meta name="prodname" content="">
  <meta name="version" content="">
  <meta name="brand" content="30-OceanProtect Appliance 1.5.0-1.6.0 Help Center">
  <meta name="DC.Publisher" content="20241029">
  <meta name="prodname" content="csbs">
  <meta name="documenttype" content="usermanual">
  <meta name="DC.Format" content="XHTML">
  <meta name="DC.Identifier" content="kubernetes_gud_00017">
  <meta name="DC.Language" content="en-us">
  <link rel="stylesheet" type="text/css" href="public_sys-resources/commonltr.css">
  <title>Step 6: Performing Backup</title>
 </head>
 <body style="clear:both; padding-left:10px; padding-top:5px; padding-right:5px; padding-bottom:5px">
  <a name="kubernetes_gud_00017"></a><a name="kubernetes_gud_00017"></a>
  <h1 class="topictitle1">Step 6: Performing Backup</h1>
  <div>
   <p>The namespace or StatefulSet to be protected must be associated with a specified SLA. The system periodically performs backup based on the SLA. The default name of a copy generated by periodic backup is in the format of <em>Resource</em><strong>_</strong><em>Timestamp</em>. You can manually execute a backup job to back up data immediately.</p>
   <div class="section">
    <h4 class="sectiontitle">Precautions</h4>
    <ul>
     <li>Ensure that the production storage has reserved snapshot space for backup. Reserved snapshot space = Data volume of the source LUN × Percentage of data changes in the backup period. By default, you are advised to reserve 20% of the source LUN capacity for creating snapshots.</li>
     <li>To ensure data consistency during FlexVolume restoration, you can configure <span class="uicontrol"><b>Script to Run Before Backup</b></span> and back up volumes of the FlexVolume type in the pod.</li>
    </ul>
   </div>
   <div class="section">
    <h4 class="sectiontitle">Context</h4>
    <ul>
     <li>During manual backup, parameters (except <span class="uicontrol"><b><span><strong>Automatic Retry</strong></span></b></span>) defined in the SLA are applied to the manual backup job.</li>
     <li>Copies generated by manual backup are retained for the duration defined in the SLA.<p>If the protection policy selected during manual backup is not defined in the SLA, the generated backup copies are retained permanently. If full backup is not defined in the SLA but selected during manual backup, the copies generated by the manual full backup are retained permanently.</p></li>
     <li>If a replication or archive policy has been defined in the SLA, the system will perform replication or archiving once based on the SLA when you perform manual backup.</li>
    </ul>
   </div>
   <div class="section">
    <h4 class="sectiontitle">Periodically Backing Up a Namespace</h4>
    <ol>
     <li><span>Choose <span class="uicontrol" id="kubernetes_gud_00017__kubernetes_gud_00012_en-us_topic_0000001839142377_uicontrol84751741193812"><b><span id="kubernetes_gud_00017__kubernetes_gud_00012_en-us_topic_0000001839142377_text194759416387"><strong>Protection</strong></span> &gt; Containers &gt; Kubernetes FlexVolume</b></span>.</span></li>
     <li><span>Click the <span><strong>Namespace</strong></span> tab and select the namespace to be protected.</span></li>
     <li><span>Click <span class="uicontrol"><b><span><strong>Protect</strong></span></b></span>.</span></li>
     <li><span>Select an SLA.</span><p></p>
      <div class="p" id="kubernetes_gud_00017__en-us_topic_0000001964713008_p16181740836">
       You can also click <span class="uicontrol" id="kubernetes_gud_00017__en-us_topic_0000001964713008_uicontrol169554520714"><b><span id="kubernetes_gud_00017__en-us_topic_0000001964713008_text179554516717"><strong>Create</strong></span></b></span> to create an SLA.
       <div class="note" id="kubernetes_gud_00017__en-us_topic_0000001964713008_note25947145710">
        <img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span>
        <div class="notebody">
         <p id="kubernetes_gud_00017__en-us_topic_0000001964713008_p125947145711"><span id="kubernetes_gud_00017__en-us_topic_0000001964713008_ph1413818422327">If a WORM policy has been configured for the resources to be protected, select an SLA without a WORM policy to avoid WORM policy conflicts.</span></p>
        </div>
       </div>
      </div> <p></p></li>
     <li><span>Select agent hosts.</span><p></p><p>Select all agent hosts deployed on the Kubernetes cluster node where the resource is located.</p> <p></p></li>
     <li><span>Set the parameters as follows:</span><p></p>
      <ol type="a">
       <li>Choose whether to replace the existing StatefulSet SLA.
        <div class="p">
         The default value is <span class="uicontrol"><b><span><strong>Retain the existing SLA of StatefulSet</strong></span></b></span>.
         <div class="note">
          <img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span>
          <div class="notebody">
           <p>If you choose <span class="uicontrol"><b><span><strong>Retain the existing SLA of StatefulSet</strong></span></b></span> when modifying the SLA associated with the namespace, the StatefulSet SLA will be replaced if the SLA of the StatefulSet is the same as that of the namespace.</p>
          </div>
         </div>
        </div></li>
       <li>Choose one or more options from the following to apply the SLA:
        <ul>
         <li><span><strong>Apply the namespace SLA to all StatefulSet resources that are not associated with any SLA</strong></span></li>
         <li><span><strong>Apply the namespace SLA to new StatefulSet resources</strong></span><p>After the Kubernetes cluster is scanned, the newly discovered StatefulSet is associated with the same SLA as the namespace.</p></li>
        </ul></li>
       <li>Specify the StatefulSets to be excluded from or included in the protection plan.<p>You can specify the StatefulSets to be excluded or included based on StatefulSet names.</p> <p>Exact match and fuzzy match of StatefulSet names are supported. Fuzzy match rules include prefix match (for example, abc*), suffix match (for example, *abc), and infix match (for example, *abc*).</p></li>
      </ol> <p></p></li>
     <li><span>Click <span class="uicontrol" id="kubernetes_gud_00017__en-us_topic_0000001964713008_uicontrol23691650677"><b>OK</b></span>.</span><p></p><p id="kubernetes_gud_00017__en-us_topic_0000001964713008_en-us_topic_0000001656691397_p25041111535">If the current system time is later than the start time of the first backup specified in the SLA, you can select <strong id="kubernetes_gud_00017__en-us_topic_0000001964713008_b9624185216713">Execute manual backup now</strong> in the dialog box that is displayed or choose to perform automatic backup periodically based on the backup policy set in the SLA.</p> <p></p></li>
     <li><strong>Optional: </strong><span>Perform manual backup.</span><p></p>
      <div class="p">
       If you want to execute a backup job immediately, perform manual backup through the following operations. Otherwise, skip this step.
       <ol type="a">
        <li>Click the <span class="uicontrol"><b><span><strong>Namespace</strong></span></b></span> or <span class="uicontrol"><b><span><strong>StatefulSet</strong></span></b></span> tab based on the type of the data to be backed up.
         <div class="note">
          <img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span>
          <div class="notebody">
           <p>If you choose <span class="uicontrol"><b><span><strong>Namespace</strong></span></b></span> for backup, only StatefulSets that have the same SLA as the namespace are backed up.</p>
          </div>
         </div></li>
        <li>Choose <span class="uicontrol"><b><span><strong>More</strong></span> &gt; <span><strong>Manual Backup</strong></span></b></span> on the right of the namespace or StatefulSet to be backed up.
         <div class="note">
          <img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span>
          <div class="notebody">
           <p id="kubernetes_gud_00017__en-us_topic_0000001792503838_p870125314544">You can select multiple resources to perform manual backup in batches. Select multiple resources and choose <span class="uicontrol" id="kubernetes_gud_00017__en-us_topic_0000001792503838_uicontrol14182155715711"><b><span id="kubernetes_gud_00017__en-us_topic_0000001792503838_text662114113158"><strong>More</strong></span> &gt; <span id="kubernetes_gud_00017__en-us_topic_0000001792503838_text1068159191519"><strong>Manual Backup</strong></span></b></span> in the upper left corner of the page.</p>
          </div>
         </div></li>
        <li>Set the name of the copy generated through manual backup.<p>If this parameter is left unspecified, the system sets the copy name to <strong>backup_</strong><em>Timestamp</em> by default.</p></li>
        <li>Select a protection policy, which can be <strong>Full Backup</strong> or <strong>Forever Incremental (Synthetic Full) Backup</strong>.
         <div class="note">
          <img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span>
          <div class="notebody">
           <p id="kubernetes_gud_00017__en-us_topic_0000001964713008_p13522118194919"><span id="kubernetes_gud_00017__en-us_topic_0000001964713008_ph19374310343">For 1.6.0 and later versions, if the selected protection policy is different from that configured in the associated SLA, the WORM configuration does not take effect.</span></p>
          </div>
         </div></li>
        <li>Click <span class="uicontrol"><b><span><strong>OK</strong></span></b></span>.</li>
       </ol>
      </div> <p></p></li>
    </ol>
   </div>
   <div class="section">
    <h4 class="sectiontitle">Periodically Backing Up a StatefulSet</h4>
    <ol>
     <li><span>Choose <span class="uicontrol" id="kubernetes_gud_00017__kubernetes_gud_00012_en-us_topic_0000001839142377_uicontrol84751741193812_1"><b><span id="kubernetes_gud_00017__kubernetes_gud_00012_en-us_topic_0000001839142377_text194759416387_1"><strong>Protection</strong></span> &gt; Containers &gt; Kubernetes FlexVolume</b></span>.</span></li>
     <li><span>Click the <span><strong>StatefulSet</strong></span> tab and select the StatefulSet to be protected.</span></li>
     <li><span>Click <span class="uicontrol"><b><span><strong>Protect</strong></span></b></span>.</span></li>
     <li><span>Select volumes to be backed up.</span><p></p><p><strong>Automatic Volume Protection</strong> is enabled by default to back up volumes of the FlexVolume type in the StatefulSet. You can disable <strong>Automatic Volume Protection</strong> and click <span><strong>Please select</strong></span> to manually select volumes of the FlexVolume type for backup.</p> <p></p></li>
     <li><span>Select an SLA.</span><p></p>
      <div class="p" id="kubernetes_gud_00017__en-us_topic_0000001964713008_p16181740836_1">
       You can also click <span class="uicontrol" id="kubernetes_gud_00017__en-us_topic_0000001964713008_uicontrol169554520714_1"><b><span id="kubernetes_gud_00017__en-us_topic_0000001964713008_text179554516717_1"><strong>Create</strong></span></b></span> to create an SLA.
       <div class="note" id="kubernetes_gud_00017__en-us_topic_0000001964713008_note25947145710_1">
        <img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span>
        <div class="notebody">
         <p id="kubernetes_gud_00017__en-us_topic_0000001964713008_p125947145711_1"><span id="kubernetes_gud_00017__en-us_topic_0000001964713008_ph1413818422327_1">If a WORM policy has been configured for the resources to be protected, select an SLA without a WORM policy to avoid WORM policy conflicts.</span></p>
        </div>
       </div>
      </div> <p></p></li>
     <li><span>Select the agent hosts.</span><p></p><p id="kubernetes_gud_00017__kubernetes_gud_00018_p979713913166">Select all agent hosts deployed on the Kubernetes cluster node where the resource is located.</p> <p></p></li>
     <li><span>Configure the custom script.</span><p></p>
      <div class="p">
       <a href="#kubernetes_gud_00017__table13924192919230">Table 1</a> describes the related parameters. 
       <div class="tablenoborder">
        <a name="kubernetes_gud_00017__table13924192919230"></a><a name="table13924192919230"></a>
        <table cellpadding="4" cellspacing="0" summary="" id="kubernetes_gud_00017__table13924192919230" frame="border" border="1" rules="all">
         <caption>
          <b>Table 1 </b>Custom script parameters
         </caption>
         <colgroup>
          <col style="width:22.11%">
          <col style="width:77.89%">
         </colgroup>
         <thead align="left">
          <tr>
           <th align="left" class="cellrowborder" valign="top" width="22.11%" id="mcps1.3.5.2.7.2.1.2.2.3.1.1"><p>Parameter</p></th>
           <th align="left" class="cellrowborder" valign="top" width="77.89%" id="mcps1.3.5.2.7.2.1.2.2.3.1.2"><p>Description</p></th>
          </tr>
         </thead>
         <tbody>
          <tr>
           <td class="cellrowborder" valign="top" width="22.11%" headers="mcps1.3.5.2.7.2.1.2.2.3.1.1 "><p><span><strong>Script to Run Before Backup</strong></span></p></td>
           <td class="cellrowborder" rowspan="3" valign="top" width="77.89%" headers="mcps1.3.5.2.7.2.1.2.2.3.1.2 "><p>You can configure <strong>Script to Run Before Backup</strong>, <strong>Script to Run upon Backup Success</strong>, and <strong>Script to Run upon Backup Failure</strong> as required. When the message "ProtectAgent started executing the prerequisite task." is displayed during a backup job, the configured script is executed in the corresponding scenario.</p> <p>Enter the absolute path of the script, for example, <strong>/opt/prescript.sh</strong>. Ensure that the script has been stored in the pod corresponding to the StatefulSet.</p> <p>For the script executed before the backup, the command output must contain any of the following items:</p> <p><strong>[feedback]status=normal</strong>: indicates that volumes of the FlexVolume type in the pod need to be backed up.</p> <p><strong>[feedback]status=ignore</strong>: indicates that volumes of the FlexVolume type in the pod will not be backed up.</p> <p><strong>[feedback]status=failed</strong>: indicates that volumes of the FlexVolume type in the pod fail to be backed up.</p> <p>If the script executed before the backup is configured but no preceding information is displayed, the backup fails.</p></td>
          </tr>
          <tr>
           <td class="cellrowborder" valign="top" headers="mcps1.3.5.2.7.2.1.2.2.3.1.1 "><p><span><strong>Script to Run upon Backup Success</strong></span></p></td>
          </tr>
          <tr>
           <td class="cellrowborder" valign="top" headers="mcps1.3.5.2.7.2.1.2.2.3.1.1 "><p><span><strong>Script to Run upon Backup Failure</strong></span></p></td>
          </tr>
         </tbody>
        </table>
       </div>
      </div> <p></p></li>
     <li><span>Click <span class="uicontrol" id="kubernetes_gud_00017__en-us_topic_0000001964713008_uicontrol23691650677_1"><b>OK</b></span>.</span><p></p><p id="kubernetes_gud_00017__en-us_topic_0000001964713008_en-us_topic_0000001656691397_p25041111535_1">If the current system time is later than the start time of the first backup specified in the SLA, you can select <strong id="kubernetes_gud_00017__en-us_topic_0000001964713008_b9624185216713_1">Execute manual backup now</strong> in the dialog box that is displayed or choose to perform automatic backup periodically based on the backup policy set in the SLA.</p> <p></p></li>
     <li><strong>Optional: </strong><span>Perform manual backup.</span><p></p>
      <div class="p">
       If you want to execute a backup job immediately, perform manual backup through the following operations. Otherwise, skip this step.
       <ol type="a">
        <li>Click the <span class="uicontrol"><b><span><strong>Namespace</strong></span></b></span> or <span class="uicontrol"><b><span><strong>StatefulSet</strong></span></b></span> tab based on the type of the data to be backed up.
         <div class="note">
          <img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span>
          <div class="notebody">
           <p>If you choose <span class="uicontrol"><b><span><strong>Namespace</strong></span></b></span> for backup, only StatefulSets that have the same SLA as the namespace are backed up.</p>
          </div>
         </div></li>
        <li>Choose <span class="uicontrol"><b><span><strong>More</strong></span> &gt; <span><strong>Manual Backup</strong></span></b></span> on the right of the namespace or StatefulSet to be backed up.
         <div class="note">
          <img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span>
          <div class="notebody">
           <p id="kubernetes_gud_00017__en-us_topic_0000001792503838_p870125314544_1">You can select multiple resources to perform manual backup in batches. Select multiple resources and choose <span class="uicontrol" id="kubernetes_gud_00017__en-us_topic_0000001792503838_uicontrol14182155715711_1"><b><span id="kubernetes_gud_00017__en-us_topic_0000001792503838_text662114113158_1"><strong>More</strong></span> &gt; <span id="kubernetes_gud_00017__en-us_topic_0000001792503838_text1068159191519_1"><strong>Manual Backup</strong></span></b></span> in the upper left corner of the page.</p>
          </div>
         </div></li>
        <li>Set the name of the copy generated through manual backup.<p>If this parameter is left unspecified, the system sets the copy name to <strong>backup_</strong><em>Timestamp</em> by default.</p></li>
        <li>Select a protection policy, which can be <strong>Full Backup</strong> or <strong>Forever Incremental (Synthetic Full) Backup</strong>.
         <div class="note">
          <img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span>
          <div class="notebody">
           <p><span>For 1.6.0 and later versions, if the selected protection policy is different from that configured in the associated SLA, the WORM configuration does not take effect.</span></p>
          </div>
         </div></li>
        <li>Click <span class="uicontrol"><b><span><strong>OK</strong></span></b></span>.</li>
       </ol>
      </div> <p></p></li>
    </ol>
   </div>
  </div>
  <div>
   <div class="familylinks">
    <div class="parentlink">
     <strong>Parent topic:</strong> <a href="kubernetes_gud_00011.html">Backing Up a Namespace or StatefulSet</a>
    </div>
   </div>
  </div>
 </body>
</html>